package com.ymk.cmd;

import com.ymk.base.cmd.ACmd;
import com.ymk.base.cmd.CmdSign;
import com.ymk.bo.user.MchDeskBO;
import com.ymk.core.code.cmd.UserCmdCode;
import com.ymk.service.IMchDeskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;

@Service
public class MchDeskDelCmd extends ACmd {

    @Override
    public CmdSign executeMop(HttpServletRequest request, CmdSign sign) throws Exception {
        CmdSign respSign = new CmdSign(sign);
        MchDeskBO reqData = super.getData(sign, MchDeskBO.class);

        MchDeskBO delMchDeskBO = new MchDeskBO();
        delMchDeskBO.setId(reqData.getId());
        this.MchDeskService.del(delMchDeskBO);

        return respSign;
    }

    @Override
    public String getCmdCode() {
        return UserCmdCode.MCH_DESK_DEL;
    }

    @Autowired
    private IMchDeskService MchDeskService;
}